/**
 * (c) 2015 StreamSets, Inc. All rights reserved. May not be copied, modified, or distributed in whole or part without
 * written consent of StreamSets, Inc.
 */
package com.streamsets.pipeline.util;

import java.io.File;
import java.util.List;

public class SystemProcessFactory {
  public SystemProcess create(String name, File tempDir, List<String> args) {
    SystemProcess systemProcess;
    if (Boolean.getBoolean("sdc.testing-mode")) {
      systemProcess = new MiniSDCSystemProcessImpl(name, tempDir, args, new File(System.getProperty("test.data.dir")));
    } else {
      systemProcess = new SystemProcessImpl(name, tempDir, args);
    }
    return systemProcess;
  }
}
